// init state
const state = { // 设置全局状态
  IsLogin: false
}

const getters = { // 设置全局状态的获取
  getLogin (state) {
    return state.IsLogin
  }
}

const mutations = { // 全局状态的同步修改
  login (state) {
    state.IsLogin = true
  },
  logout (state) {
    state.IsLogin = false
  }
}

export default {
  namespaced: true,
  state,
  getters,
  mutations
}
